This invention relates to a system and method for binding compiled routines to create a procedure or process to be run by a data processor, the system residing in the data processor. More importantly, the present invention relates to such a system and method which are recursive in nature.
Present day information processing systems employ two standard features to enhance data processing capabilities. One such feature is that of multiprogramming and multiprocessing in order to better utilize the data processor's processing time. Multiprogramming is generally described as the concurrent running of two or more processes or programs in a single processor while multiprocessing is generally described as the employment of two or more processors to concurrently run a plurality of processes or programs. Another feature employed in all present day information processing systems is that of the use of higher level programming languages with which programs may be generated in terms of mathematical symbols and terms having correspondence to the English language so that the programs will have some literal meaning to the user. The various information processing systems are then provided with compilers to receive the higher level language programs for compilation into strings of machine language instructions or object code which in turn are directly readable by the data processing system. In this manner, programs written in a higher level language will not be machine dependent even though the machine language or object code is machine dependent which machine language embodies the program to be run in the system.
With the advent of multiprogramming in either a mono or multiprocessing system, it has been recognized that a large number of the programs, which are to be compiled and then executed by the system, employ the same or at least similar subroutines the compilation of which would be redundant if required for each of the subprocesses of the various host programs. As a result, the technique has been developed of proviously compiling such subroutines into machine language and storing them, for example, in the back-up or bulk storage system which may be one or more disk files. A Binder routine is then provided as a part of the operating system to fetch the compiled subroutines when they are called for by the host program and to add them to the object code or machine language strings being created for the compiled form of the host program. Such binding routines in the prior art have been of the iterative form which requires that the binding algorithm must be invoked each time a subroutine is required to be called forth.
As distinct from the iterative form, program routines can be created in a recursive or re-entrant form which, in general, is a more natural form for the embodiment of higher level program languages. That is to say, many higher level program languages such as Algol have procedures which are recursive in nature. When data processing systems are designed for the implementation of such higher level languages, the operating system and any binder routine which is a part thereof, are usually written in that higher level language.
In a very general sense, a recursive routine may be described as one which is adapted to call itself or re-enter itself. It can be demonstrated that a routine can be expressed in either an iterative form or recursive form and that the two forms are logically equivalent. However, each form has its own particularly distinct advantages. Early day computing systems and many of the computing systems in existence today were designed to handle routines in iterative form. For this reason, programs in iterative form are more easily handled by such systems than are programs in recursive form. However, such systems do not readily receive programs written in the more sophisticated higher level languages such as ALGOL 60. Such higher level languages provide flexibility for writing more comprehensive programs, particularly when the ability is provided to employ recursive procedures.
There has been an increasing tendency in the design of present day data processing systems to employ stack oriented processors wherein push down stacks, or first-in last-out stacks, are provided to accommodate nested processes and recursive procedures as employed by particular higher program languages. When such stack oriented processors are provided, then the Master Control Program, and other routines which form a part of the operating system, can also be written in a particular higher level language as well as the various compilers.
It is, then an object of the present invention to provide an improved system and method for creating an object code file of compiled nested routines as called for by a host procedure.
It is another object of the present invention to provide a system and method for the binding of compiled subroutines and making changes in the object code thereof as required to create a new code file for a host procedure.
It is still another object of the present invention to provide a system and method for the binding together of compiled subroutines which system and method are recursive in nature.